#使用多线程计算0-9的每个数的平方
from multiprocessing.dummy import Pool

def cal_power(num):
    return num*num

pool=Pool(3)
original_num=[x for x in range(10)]
result=pool.map(cal_power,original_num)
print(f'计算0-9的平方分别为:{result}')
